package com.heima.article.job;

import com.heima.article.service.HotArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName ComputeHotArticle
 * @Description TODO
 * @Author kiku
 * @Date 2024/9/2 15:18
 * @Version 1.0
 */
@Component
@Slf4j
public class ComputeHotArticle {
    @Autowired
    private HotArticleService hotArticleService;

    @XxlJob("computeHotArticleJob")
    public void handle() {
        log.info("热文章分值计算调度任务开始执行...");
        hotArticleService.computeHotArtice();
        log.info("热文章分值计算调度任务结束执行...");
    }
}
